package com.qqtop10.manager.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qqtop10.manager.dao.AdvertiseMapper;
import com.qqtop10.manager.model.Advertise;
import com.qqtop10.manager.model.PagingArgs;
import com.qqtop10.manager.service.AdvertiseService;

@Service("advertiseService")
public class AdvertiseServiceImpl extends BaseService implements AdvertiseService {

	@Autowired
	private AdvertiseMapper advertiseMapper;

	@Override
	public List<Advertise> all(Advertise input, PagingArgs pagingArgs) {
		return advertiseMapper.all(asMap(input, pagingArgs));
	}

	@Override
	public int count(Advertise input) {
		return advertiseMapper.count(input);
	}

	@Override
	public boolean add(Advertise input) {
		return advertiseMapper.add(input) != 0;
	}

	@Override
	public boolean update(Advertise input) {
		return advertiseMapper.update(input) != 0;
	}

	@Override
	public boolean disable(Advertise input) {
		return advertiseMapper.disable(input) != 0;
	}

	@Override
	public List<Advertise> selectBySelective(Map<String, Object> map) {
		return advertiseMapper.selectBySelective(map);
	}

	@Override
	public int updateDisableShow(int type) {
		return advertiseMapper.updateDisableShow(type);
	}

	@Override
	public int updateShow(Integer id) {
		return advertiseMapper.updateShow(id);
	}

	@Override
	public int selectTypeShowCount(int type) {
		return advertiseMapper.selectTypeShowCount(type);
	}

	@Override
	public Advertise selectSearchBoxAdvertise() {
		return advertiseMapper.selectSearchBoxAdvertise();
	}

}
